Repository navigation
fix(session-flow): carry amendment bullets below the predecessor's Opening ask - #4164
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 53s —— View job Security review —
|
|
Last security-reviewed head: |
|
Claude finished @kyle-sexton's task in 3m 27s —— View job Code review (
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0d963d863
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
|
PR body contract — issue linkage This PR body conforms to the issue-linkage contract. Nothing to do. |
The cap counter inside `_check_original_goal` still broke on `**` only, so after the carry fix the same function held two disagreeing definitions of where the opening ask ends: an amendment bullet below a hop-1 file's own `Opening ask:` line was excluded from the goal quote but still counted against the ask length, which can warn about ask length the ask did not contribute. It now uses `_ends_opening_ask` like the other two reads. Raised by the Claude review lane on PR #4164. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mbb3nkTfMrT9vDmoUnQuj
|
Review-lane follow-up: taken. The hop-1 The Codex P2 thread on the bullet terminator is answered inline and resolved: a narrower |
…ening ask `save_point.py new` built the successor's Original goal by copying the predecessor's section and skipping the verbatim opening ask. The skip entered on `Opening ask:` and only ended on a line starting with `**`, so an amendment bullet (`- **Amended (verbatim, ...)`) sitting below the ask was swallowed and never reached the successor. Two hops of a real chain had to re-add those bullets by hand. The skip now ends at any structural marker: a `**` line or a bullet. A verbatim ask carries no bullets by contract, so this keeps multi-paragraph asks out of the successor, which is what the `**`-only terminator was for. The validator reads the same section with the same loop, so both route through one `_ends_opening_ask` predicate reusing the existing `BULLET_RE`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mbb3nkTfMrT9vDmoUnQuj
The cap counter inside `_check_original_goal` still broke on `**` only, so after the carry fix the same function held two disagreeing definitions of where the opening ask ends: an amendment bullet below a hop-1 file's own `Opening ask:` line was excluded from the goal quote but still counted against the ask length, which can warn about ask length the ask did not contribute. It now uses `_ends_opening_ask` like the other two reads. Raised by the Claude review lane on PR #4164. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mbb3nkTfMrT9vDmoUnQuj
The dropped bullets were re-added by hand at two hops of one handoff chain, not across two chains. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mbb3nkTfMrT9vDmoUnQuj
edc2034 to
efd84b5
Compare
Summary
save_point.py newdropped the predecessor's "Original goal" amendment bullets that sat below itsOpening ask:line, so every successor handoff silently lost them. This makes the section carry keepevery bullet in the predecessor's Original goal regardless of position, with one regression test that
fails on
mainand passes here.No linked issue.
Root cause
plugins/session-flow/scripts/save_point.py:1093-1099(pre-fix line numbers) — thenewcommandassembles the successor's
## Original goalby copying the predecessor's section and skipping theverbatim opening ask:
The skip is entered on
Opening ask:and ends only on a line starting with**. An amendmentbullet starts with
-, so every- **Amended (verbatim, …)** …bullet sitting BELOW thepredecessor's
Opening ask:line is swallowed and never reaches the successor. The**-onlyterminator was deliberate (added in #3718) so that paragraph 2 of a multi-paragraph verbatim ask
would not be smuggled into the successor's goal block; it is simply too narrow.
Observed twice on a real chain, both times repaired by hand:
.work/handoffs/20260908T151602Z-handoff-plugin-sync-3688-item4-followups-merged.md— carriesthe note
(The two hop-9 bullets above were re-added this hop verbatim from the hop-9 file on disk; save_point.py new did not carry them because they sat below that file's Opening ask: line.).work/handoffs/20260908T173036Z-handoff-plugin-sync-3688-all-followups-closed.md— same, threebullets re-added from the hop-10 file.
Fix
One predicate, reusing the module's existing
BULLET_RE:The skip now ends at any structural marker — a
**line or a bullet. A verbatim opening askcarries no bullets by contract (the skeleton's own
opening-askslot says "no bullets"), somulti-paragraph asks are still excluded exactly as before; only bullets, which are never ask
content, now end the skip.
All three reads of the section route through the predicate: the carry in
build_skeleton, thegoal-quote skip in
_check_original_goal, and (after review feedback) that function's hop-1OPENING_ASK_CAPcounter — one definition of the section boundary rather than three that can drift.Carried bullets land above the
Opening ask: see … § Original goalpointer, which is where anamendment belongs; the new test pins that too.
Verification
One case added to the pytest suite that
plugins/session-flow/scripts/save_point.test.shexecs(
tests/test_save_point.py::test_new_hop2_carries_amendments_below_the_opening_ask). It builds ahop-1 save-point, appends one amendment bullet below its
Opening ask:line, runsnew --previous,and asserts the bullet survives into hop 2 above the pointer and that hop 2 still validates strict.
Fails on current
main'ssave_point.py(test present, fix stashed out):Passes with the fix, and the whole file stays green:
Also run locally:
scripts/affected-tests.sh(selectssave_point.test.sh,tests/test_save_point.py,harness/hop_chain.test.sh),harness/hop_chain.test.sh(22/22 dry-runcases + the 20-hop budget projection, PASS),
scripts/validate-plugins.sh(all manifests + catalog),scripts/run-ruff.sh checkon both edited.pyfiles (clean).Version
Patch bump
0.35.12 → 0.35.13plus a### FixedCHANGELOG top-insert..claude-plugin/marketplace.jsoncarries no version field for session-flow, so there is no catalog line to bump (the only other
0.35.12hit in the repo is thework-itemsplugin's own unrelated entry).Not verified
pytest, sosave_point.test.shSKIPs here by design; the suite was runthrough an ephemeral
uv run --with pytestenvironment instead. The Linux CI lane is the truthfor the runner path itself.
affected-tests.sh --runis a Linux-only gate and was not run; the three selected suites were runindividually instead.
OPENING_ASK_CAPwarn path has no test coverage before or after this change; theone-line consistency fix there is reasoned, not pinned.
Related
**-only ask terminator this narrows.🤖 Generated with Claude Code
https://claude.ai/code/session_011mbb3nkTfMrT9vDmoUnQuj